﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 众包库龄信息
    /// </summary>
    /// 
    public class PL_InventoryAgeDTO
    {
        public int code { get; set; }
        public string message { get; set; }
        public PL_InventoryAge data { get; set; }


    }

    public class PL_InventoryAge
    {
        /// <summary>
        /// 库存列表
        /// </summary>
        public List<List> list { get; set; }
        public class List
        {
            /// <summary>
            /// 
            /// </summary>
            public string ID { get; set; }
            public string RowId { get; set; }
            /// <summary>
            /// 批次号
            /// </summary>
            public string batch_no { get; set; }
            /// <summary>
            /// SKU编号
            /// </summary>
            public string SKU { get; set; }
            /// <summary>
            /// 单据号
            /// </summary>
            public string order_no { get; set; }
            /// <summary>
            /// 仓库代码
            /// </summary>
            public string warehouse_code { get; set; }
            /// <summary>
            /// 剩余数量
            /// </summary>
            public int balance_quantity { get; set; }
            /// <summary>
            /// 业务类型
            /// </summary>
            public string business_type_;
            public string business_type
            {

                get { return business_type_; }

                set
                {
                    if (value == "ro_in") business_type_ = "入库单";
                    else if (value == "rma_in") business_type_ = "RMA入库单";
                    else if (value == "check") business_type_ = "盘点调整";
                    else if (value == "adjust") business_type_ = "手工调库存";
                    else if (value == "stock_transfer") business_type_ = "转仓入库";
                    else if (value == "move") business_type_ = "移库位";
                    else if (value == "other_in") business_type_ = "其他入库";
                    else business_type_ = value;

                }
            }
            /// <summary>
            /// 上架日期
            /// </summary>

            public string put_on_date { get; set; }
            /// <summary>
            /// 更新时间
            /// </summary>

            public string update_time { get; set; }

            /// <summary>
            /// 库龄
            /// </summary>
            public int Age { get; set; }
        }


        /// <summary>
        /// 页数信息
        /// </summary>
        public Page page { get; set; }
        public class Page
        {
            /// <summary>
            /// 页大小
            /// </summary>
            public string page_size { get; set; }
            /// <summary>
            /// 页号
            /// </summary>
            public string page_number { get; set; }
            /// <summary>
            /// 单页最大数
            /// </summary>
            public string total_page { get; set; }
            /// <summary>
            /// 总数量
            /// </summary>
            public string total { get; set; }

        }

    }

}
